<?php 
defined('_JEXEC') or die('Restricted access');

jimport('joomla.application.component.model');

class DocarioModelCategories extends JModel {
    var $_data;
    var $_id;

    function __construct() {
        parent::__construct();
    }
    
    function getCategories($id) {
        $query = 'select * from #__docario_category';
        $query .= ' where 1=1';
        
        $query .= ' and published=1 and parent_id='.$id;
        
        $this->_db->setQuery($query);
        
        return $this->_db->loadObjectList();
    }
}
